package com.ml.poc.testlink.junit;

import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestListener;

class ResultLisener implements TestListener {

		public void addError(Test arg0, Throwable arg1) {
			System.out.println(arg0.getClass());
//			System.out.println(arg1.getStackTrace());
			for (StackTraceElement ste : arg1.getStackTrace()) {
				System.out.println(ste.toString());
			}
		}

		public void addFailure(Test arg0, AssertionFailedError arg1) {
			int i = 10;
			while(i>0){
				i--;
				System.out.println("HHHHH");
			}
			System.out.println(arg0.getClass());
//			System.out.println(arg1.getCause().getMessage());
		}

		public void endTest(Test arg0) {
			System.out.println(arg0.toString()+" End");
		}

		public void startTest(Test arg0) {
			System.out.println(arg0.countTestCases());
			System.out.println(arg0.toString()+"Start");
		}
	}